package pri.syl.xiaowu.websocket.core.template;

import pri.syl.xiaowu.websocket.core.template.core.constant.WebsocketMessageConstant;

/**
 * @Author YunLong
 * @Date 2021/7/18 18:08
 * @Description 抽象websocket事件模板
 **/
public abstract class AbstractWebsocketRouteTemplate implements WebsocketRouteTemplate {

    @Override
    public void pingMessageEvent(WebsocketChannelTemplate channelTemplate, WebsocketMessageTemplate messageTemplate) {
        channelTemplate.pingMessage(WebsocketMessageConstant.PING_RESPONSE.getValue());
    }

    @Override
    public void pongMessageEvent(WebsocketChannelTemplate channelTemplate, WebsocketMessageTemplate messageTemplate) {
        channelTemplate.pongMessage(WebsocketMessageConstant.PONG_RESPONSE.getValue());
    }


}
